const express = require("express");
const router = express.Router();
const {
  login
} = require("../controllers/loginControoler");
router.post("/api/login", (req, res,next) => {
  const {body}=req
  login(body).then((data) => {
    res.send(data)
  }).catch((err) => {
    next(err)
  });
});


module.exports = router;